package com.vip.jwt.common.utils.tree;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

@Getter
@Setter
@ToString
public class VipTree {

    private String id;

    /**
     * 标题
     */
    private String title;

    /**
     * 层(这个必须是按顺序从小到大，而且是连续的)
     */
    private Integer layer;

    /**
     * 父级id(顶级父节点必须为空)
     */
    private String parentId;

    /**
     * 子树
     */
    private List<VipTree> children;

    public VipTree(String id, String title,Integer layer,String parentId) {
        this.id = id;
        this.title = title;
        this.layer = layer;
        this.parentId = parentId;
    }

}
